import request from '../utils/request'

export interface SystemForm {
  id?: number
  systemCode: string
  systemName: string
  description: string
  status: 0 | 1
}

// 获取系统列表
export const getSystemList = () => {
  return request({
    url: '/system/list',
    method: 'get'
  })
}

// 新增或编辑系统
export const saveSystem = (data: SystemForm) => {
  return request({
    url: '/system/save',
    method: 'post',
    data
  })
}

// 删除系统
export const deleteSystem = (id: number) => {
  return request({
    url: `/system/${id}`,
    method: 'delete'
  })
} 